<template>
  <div></div>
</template>
<script setup>
import { Leafer, Rect } from 'leafer-ui'
import '@leafer-in/animate' // 导入动画插件 //

const leafer = new Leafer({ view: window })

const rect = new Rect({
  y: 100,
  cornerRadius: 50,
  fill: '#32cd79',
  animation: {
    style: { x: 500, cornerRadius: 0, fill: '#ffcd00' }, // style keyframe
    duration: 1,
    swing: true // 摇摆循环播放
  }
})

leafer.add(rect)
</script>
